import { http } from "@/utils/http";

type ListResult = {
  code: number;
  message: string;
  list: Array<any>;
};

export function getListApi(params?: object): Promise<ListResult> {
  return http.request({
    url: "/list/get",
    method: "get",
    params
  });
}

export function getListApiError(data?: object): Promise<ListResult> {
  return http.request({
    url: "/list/error",
    method: "post",
    data
  });
}


// 获取单位概况列表 /api/xxgk/unit
export function unit(data = {}) {
  return http.request({
    url: "/api/xxgk/unit",
    method: "post",
    data
  });
}
// 获取单位概况详情 /api/xxgk/unit_detail
export function unit_detail(data = {}) {
  return http.request({
    url: "/api/xxgk/unit_detail",
    method: "post",
    data
  });
}
// 获取领导分工列表 /api/xxgk/manager
export function manager(data = {}) {
  return http.request({
    url: "/api/xxgk/manager",
    method: "post",
    data
  });
}
//  获取领导分工详情 /api/xxgk/manager_detail
export function manager_detail(data = {}) {
  return http.request({
    url: "/api/xxgk/manager_detail",
    method: "post",
    data
  });
}
// 获取科室职能列表 /api/xxgk/department
export function department(data = {}) {
  return http.request({
    url: "/api/xxgk/department",
    method: "post",
    data
  });
}
// 获取科室职能详情 /api/xxgk/department_detail
export function department_detail(data = {}) {
  return http.request({
    url: "/api/xxgk/department_detail",
    method: "post",
    data
  });
}

// 获取攻坚行动列表 /api/xxgk/action
export function action(data = {}) {
  return http.request({
    url: "/api/xxgk/action",
    method: "post",
    data
  });
}
// 获取攻坚行动详情 /api/xxgk/action_detail
export function action_detail(data = {}) {
  return http.request({
    url: "/api/xxgk/action_detail",
    method: "post",
    data
  });
}
